<!doctype html>
<html><head>
<meta charset="utf-8">
<title>字体图标多彩按钮</title>
	<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
	<style type="text/css">
		*{
			padding:0;
			margin: 0;
		}
		body{
			display:flex;
			justify-content: center;
			align-items: center;
			height: 100vh;
			background: #eee;
		}
		.container{
			display:flex;
		}
		.container .btn{
			overflow: hidden;
			position:relative;
			width: 90px;
			height: 90px;
			text-align: center;
			background: #fff;
			border-radius: 25px;
			margin: 0 10px;
			box-shadow: 0 5px 15px -5px rgba(0,0,0,0.1);
		}
		.container .fa{
/*			字体图标可以用设置字体代码设置属性*/
			font-size: 38px;
/*			缩放0.8倍*/
			transform: scale(0.8);
			line-height: 90px;
			transition: all 0.4s cubic-bezier(.31,-0.1,.43,1.59);
		}
		.container .btn::before{
			content:"";
			position: absolute;
			top:90%;
			left: -110%;
			width: 120%;
			height: 120%;
			transform: rotate(45deg);
			transition: all 0.4s cubic-bezier(.31,-0.1,.43,1.59);
		}
		.container .btn .fa-bell{color:#6ddad5;}
		.container .btn_bell::before{background:#6ddad5;}
		.container .btn .fa-bank{color:#9782ff;}
		.container .btn_bank::before{background:#9782ff;}
		.container .btn .fa-bus{color:#42a5f8;}
		.container .btn_bus::before{background:#42a5f8;}
		.container .btn .fa-camera{color:#b68cee;}
		.container .btn_camera::before{background:#b68cee;}
		.container .btn .fa-cc{color:#f9729b;}
		.container .btn_cc::before{background:#f9729b;}
		.container .btn:hover::before{
			top:-10%;
			left: -10%;
		}
		.container .btn:hover .fa{
			color:#fff;
/*			鼠标移入 恢复到原来大小*/
			transform: scale(1);
		}
	</style>

</head>

<body>
	<div class="container">
		<a href="javascript:void(0)" class="btn btn_bell"><i class="fa fa-bell"></i></a>
		<a href="javascript:void(0)" class="btn btn_bank"><i class="fa fa-bank"></i></a>
		<a href="javascript:void(0)" class="btn btn_bus"><i class="fa fa-bus"></i></a>
		<a href="javascript:void(0)" class="btn btn_camera"><i class="fa fa-camera"></i></a>
		<a href="javascript:void(0)" class="btn btn_cc"><i class="fa fa-cc"></i></a>
	</div>
</body>
</html>
